<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>订单管理</title>
    <!--<link rel="stylesheet" type="text/css" href="css/base.min.css" />
    <link rel="stylesheet" type="text/css" href="css/common.css" />-->
    <link rel="stylesheet" type="text/css" href="{:_SKIN}/user/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="{:_SKIN}/user/css/baojia.css" />
    <script src="{:_SKIN}/user/layui/lay/dest/layui.all.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">.layui-table, .layui-table th { text-align: center; font-size: 12px; } .layui-table { margin-top: -10px; } .layui-tab-title a { text-decoration: none; }</style></head>
  
  <body>
    <div class="content">
      <div class="titlebar">
        <div class="titlebar-name">我的收藏</div></div>
      <div class="layui-tab">
        <ul class="layui-tab-title">
          <li class="layui-this">全部</li>
         <!--  <li>下单成功</li>
          <li>支付成功</li>
          <li>已发货</li>
          <li>交易完成</li>
          <li>取消订单</li> --></ul>
        <div class="layui-tab-content">
          <div class="layui-tab-item layui-show">
            <table class="layui-table">
              <colgroup>
                <col width="100">
                  <col width="100">
                    <col></colgroup>
              <thead>
                <tr>
                  <th>用户</th>
                  <th>产品</th>
                  <th>时间</th>
                  <th>标题</th>
                  <th>操作</th>
              </thead>
              <tbody>
              {volist name="data" id="vo"}
                <tr>
                  <td>{$vo.username}</td>
                  <td>{$vo.pname}</td>
                  <td>{$vo.CreateTime}</td>
                  <td>{$vo.title}</td>
                  <td>
                  <a class="s_delete" style="color: red;" data-id="{$vo.id}">删除</a>
                  </td>
                </tr>
                {/volist}
              </tbody>
            </table>
          </div>
    </div>
    {:jq()}
    {:layui()}
<script type="text/javascript">
  

     $(".s_delete").click(function () {


        var id = $(this).data('id');



        var r=confirm("确定要删除吗？删除后不能恢复");

          if(r==true){

              $.post("{:url('user/buyers/delcollect')}", {id:id}, function (res) {

                                  

                if(res.code==200){
                  
                  alert('删除成功');
                  window.location.reload();

                }else{

                  alert(res.msg);
                }
              
            });




          }



  });



</script>



   
  </body>

</html>